//
// Created by Wei on 2022/5/22.
//

#ifndef B_PLUS_DB_B_PLUS_TREE_H
#define B_PLUS_DB_B_PLUS_TREE_H


#include "page.h"

class b_plus_tree {
    PAGE *findPage(unsigned int id);

public:
    b_plus_tree();

    PAGE *root_page;

    ~b_plus_tree() {
        delete root_page;
    }

    int insert(COMPACT_DATA *compactData);

    int update(COMPACT_DATA *compactData);

    int remove(unsigned int id);

    int select(unsigned int id, COMPACT_DATA *receptor);
};


#endif //B_PLUS_DB_B_PLUS_TREE_H
